package java69.work720;

public class Pet {
    protected String name;
    protected int age;
    protected String color;
    protected int legs;

    public Pet() {
    }

    public Pet(String name, int age, String color, int legs) {
        this.name = name;
        this.age = age;
        this.color = color;
        this.legs = legs;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getLegs() {
        return legs;
    }

    public void setLegs(int legs) {
        this.legs = legs;
    }

    public void run(){
        System.out.println("会跑");
    }

    public void eat(){
        System.out.println("吃饭");
    }
}
